//
// Created by lenovo on 25-5-8.
//
#include "iostream"
using namespace std;
class Parent
{
public:
    static int m_A;
    Parent()
    {
        this->m_A = 100;
    }
    static void func()
    {
        cout<<"run-> Parent Func"<<endl;
    }
    void func(int a)
    {
        cout<<"run-> Parent Func(int a)"<<a<<endl;
    }
};
class Son : public Parent
{
public:
    static int m_A;
    Son()
    {
        this->m_A = 300;
    }
    static void func()
    {
        cout<<"run-> Son Func"<<endl;
    }
};
int Parent::m_A = 100;
int Son::m_A = 300;
void Test01()
{
    Son s;
    cout<<"m_A："<<s.Parent::m_A<<endl;//通过对象访问
    cout<<"m_A：类名->"<<Son::m_A<<endl;//类名访问S
    cout<<"m_A：类名->"<<Son::Parent::m_A<<endl;//类名访问S
    s.func();
    s.Parent::func();
    Son::Parent::func();
}
int main()
{
    Test01();
    return 0;
}